package com.management.dao;

import com.management.model.Attach;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 龙世超
 * @since 2022-03-23
 */
public interface AttachDao extends BaseMapper<Attach> {

    @Delete("delete from dm_attach where defect_id=#{defectId}")
    Integer deleteByDefectId(Integer defectId);

    @Select("select * from dm_attach where defect_id=#{defectId}")
    Attach selectBydefectId(Integer defectId);
}
